var utils = require('../../../utils/utils.js');
var list = [];
Page({
  data: {
    info: []
  },
  tap: e => {
    console.log(e)
  },
  onShow:function(){
    var that = this
    wx.showLoading({ title: '查询中' })
    wx.req('locationGet', {}, '正在获取地点' ).then((res) => {
      console.log(res.odr, res.data);
      list = [];
      var r = res.data.data;
      for (var i = 0; i < r.length; i++)
        list.push({ 
          id: r[i].location_id, 
          img: "", name: r[i].name, 
          info: '经度' + r[i].lon + ', 纬度' + r[i].lat,
        });
      that.setData({ info: list });
      wx.hideLoading();
    })
  }
})